package configure.dao.impl;

import java.util.Set;
import java.util.HashSet;
import java.util.Random;
import java.util.UUID;
import bean.Entity;
import configure.dao.EntityDAO;

public class EntityDAOImpl implements EntityDAO {
    private static final Random RANDOM = new Random();

    @Override
    public Set<Entity> selectEntities() {
        Entity entity;
        Set<Entity> entities = new HashSet<>();
        for (int index = 0; index < 10; index++) {
            int a = RANDOM.nextInt(Integer.MAX_VALUE);
            double b = RANDOM.nextDouble();
            String c = UUID.randomUUID().toString();
            entity = new Entity(a, b, c);
            entities.add(entity);
        }
        return entities;
    }
}
